dnl Process this file with autoconf to produce a configure script.

AC_INIT([src/woochy.cpp])
dnl Every other copy of the package version number gets its value from here
AM_INIT_AUTOMAKE(woochy, 0.1.0)

dnl create a config.h file (Automake will add -DHAVE_CONFIG_H)
AM_CONFIG_HEADER([src/config.h])

AC_SUBST([VERSION])

ISODATE=`date +%Y-%m-%d`
AC_SUBST([ISODATE])

AC_CANONICAL_HOST

dnl Checks for programs.
AC_PROG_INSTALL
AC_PROG_CC
AC_PROG_CXX
PKG_PROG_PKG_CONFIG

dnl Checks for libraries.
PKG_CHECK_MODULES([LIBOPENCV], [opencv],,AC_MSG_ERROR([Cannot find opencv]))
AC_SUBST([LIBOPENCV_CFLAGS])
AC_SUBST([LIBOPENCV_LIBS])

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([unistd.h sys/param.h sys/time.h time.h sys/mkdev.h sys/sysmacros.h string.h memory.h fcntl.h dirent.h sys/ndir.h ndir.h alloca.h locale.h])

#jm_CHECK_TYPE_STRUCT_UTIMBUF
AC_HEADER_MAJOR
AC_FUNC_ALLOCA
AC_STRUCT_TM
AC_STRUCT_ST_BLOCKS
AC_FUNC_CLOSEDIR_VOID

dnl Checks for typedefs, structures, and compiler characteristics.

dnl Checks for library functions.

AC_OUTPUT([Makefile woochy.lsm woochy.spec src/Makefile])
